<?php

namespace app\admin\validate;

use \think\Validate;

/**
 *  用户登录
 */
class Login extends Validate
{
    protected $rule = [
        'account' => 'require',
        'password' => 'require|length:6,18',
        'verify' => 'require|length:4,6'
    ];

    //定义验证提示
    protected $message = [
        'account.require' => '账户不能为空',
        'password.require' => '密码不能为空',
        'password.length' => '密码长度请在 (6 ~ 18) 位之间',
        'verify.require' => '图像验证码不能为空',
        'verify.length' => '图像验证码长度请 (4 ~ 6 )在位之间',
    ];

    //定义验证场景
    protected $scene = [
        'account' => ['account','password','verify']
    ];


}
